@extends('student')
@section('content')
    <h1>编辑学生</h1>
    @if (count($errors) > 0)
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
    <section>
        <form action="{{url('student/form_save/'.$student->id)}}" method="POST">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
        姓名：<input name="name" type="text" value="{{$student->name}}" size="20" maxlength="200"><br>

        年龄：<input name="age" type="text" value="{{$student->age}}" size="20" maxlength="200"><br>

        性别：

            <input name="sex" type="radio" value="10"  @if ($student->sex == 10)checked="checked" @endif>未知
            <input name="sex" type="radio" value="20" @if ($student->sex == 20)checked="checked" @endif>男
            <input name="sex" type="radio" value="30" @if ($student->sex == 30)checked="checked" @endif>女<br>
            <input type="submit" value="提交" />
        </form>
    </section>
@stop